﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="missionmodify.aspx.cs" Inherits="top_crm_missionmodify" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>特特CRM_客户营销</title>
    <link href="../css/common.css" rel="stylesheet" />
    <style>
        td{font-size:12px;}
        a{color:Blue; text-decoration:none;}
    </style>
</head>
<body style="padding:0px; margin:0px;">
    <form id="form1" runat="server">
        <div>
        <div class="navigation" style="height:600px;">

  <div class="crumbs"><a href="javascript:;" class="nolink">特特CRM_客户关系营销</a> 营销计划创建 </div>
  <div class="absright">
    <ul>
      <li>
        <div class="msg">
        </div>
      </li>
    </ul>
  </div>


    <div id="main-content">
    
        <input type="button" value="返回列表" onclick="window.location.href='missionlist.aspx'" />

        <hr />
  <div style="border:solid 1px #CCE2FF; padding:4px; background-color:#E8F2FF; margin:0 3px 5px 0px; color:Red; font-weight:bold; width:700px">
      您可以创建多个客户营销计划，短信内容最多64个字，超过的话短信将分成多条发送。
  </div>

        <table width="100%">
            <tr>
                <td align="left" width="120" height="30">任务类型：</td>
                <td>
                    <input type="hidden" name="typ" value="<%=typ %>" />
                    <%=gettypinfo(typ)%>
                </td>
            </tr>
            <tr style="display:none;">
                <td align="left" width="120">会员组：</td>
                <td>
                    <select name="group">
                        <option value="0">全部会员</option>
                        
                    </select>
                </td>
            </tr>
        </table>
            <!--催单设置-->
            <div id="area1">
            <table width="100%">
                <tr>
                    <td align="left" height="30" width="120">催单短信内容：</td>
                    <td>
                        <textarea id="content1" name="cuicontent" cols="40" rows="3" onkeyup="gettextc(this, findObj('max_m').value, 'msg_c1');if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);" onkeydown="if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);"><%=content %></textarea>
                        <br />每条短信最多<span id="Span1" style="color:Red">64</span>个字，超出部分不发送，剩余：<b id="msg_c1" style="color:Red">64</b>
                    </td>
                </tr>
                <tr>
                    <td align="left" height="30">发送条件：</td>
                    <td>
                        买家拍下商品后<input name="cuidate" type="text" value="<%=timecount %>" size="4" />分钟内不付款则发送
                    </td>
                </tr>
                <tr>
                    <td align="left" height="30">短信发送时间：</td>
                    <td>
                        从<input name="startsend" type="text" value="<%=startsend %>" size="3" />点-<input name="endsend" type="text" value="<%=endsend %>" size="3" />点
                    </td>
                </tr>
                <tr>
                    <td align="left" height="30">订单满足金额才发：</td>
                    <td>
                        <input name="price" type="text" value="<%=price %>" size="4" />元 （这里写0为不限制订单金额）
                    </td>
                </tr>
                <tr>
                    <td align="left" height="30">其他：</td>
                    <td>
                        <input type="checkbox" name="ispayone" id="payone" value="1" <%=getcheck(ispayone) %> />
                        <label for="payone">一天拍下多款宝贝只要付款一个其他订单就不发短信</label> <br />
                        <input type="checkbox" name="isclose" id="close" value="1" <%=getcheck(isclose) %> />
                        <label for="close">关闭交易的订单不发送催单短信</label> <br />
                    </td>
                </tr>
            </table>
            </div>
            
            <!--生日关怀
            <div id="area2" style="display:none">
            <table width="100%">
                <tr>
                    <td align="left" height="30" width="120">生日短信内容：</td>
                    <td>
                        <textarea id="content2" name="birthdaycontent" cols="40" rows="3" onkeyup="gettextc(this, findObj('max_m').value, 'msg_c2');if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);" onkeydown="if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);"><%=content %></textarea>
                        <br />每条短信最多<span id="Span3" style="color:Red">64</span>个字，超出部分不发送，剩余：<b id="msg_c2" style="color:Red">64</b>
                    </td>
                </tr>
            </table>
            </div>-->
            

            <!--定期回访-->
            <div id="area2" style="display:none">
            <table width="100%">
                <tr>
                    <td align="left" height="30" width="120">定期回访内容：</td>
                    <td>
                        <textarea id="content3" name="backcontent" cols="40" rows="3" onkeyup="gettextc(this, findObj('max_m').value, 'msg_c3');if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);" onkeydown="if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);"><%=content %></textarea>
                        <br />每条短信最多<span id="Span2" style="color:Red">64</span>个字，超出部分不发送，剩余：<b id="msg_c3" style="color:Red">64</b>
                    </td>
                </tr>
                <tr>
                    <td align="left" height="30">回访时间：</td>
                    <td>
                        <input name="backdate" type="text" value="<%=timecount %>" size="4" />天
                    </td>
                </tr>
            </table>
            </div>

            

            <!--新品活动营销-->
            <div id="area3" style="display:none">
            <table width="100%">
                <tr>
                    <td align="left" height="30" width="120">活动营销内容：</td>
                    <td>
                        <textarea id="content4" name="actcontent" cols="40" rows="3" onkeyup="gettextc(this, findObj('max_m').value, 'msg_c4');if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);" onkeydown="if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);"><%=content %></textarea>
                        <br />每条短信最多<span id="Span4" style="color:Red">64</span>个字，超出部分不发送，剩余：<b id="msg_c4" style="color:Red">64</b>
                    </td>
                </tr>
                <tr>
                    <td align="left" height="30">发送时间：</td>
                    <td>
                        <input name="actdate" type="text" value="<%=senddate %>" size="20" />
                    </td>
                </tr>
            </table>
            </div>



            

            <!--单品短信通知-->
            <div id="area4" style="display:none">
            <table width="100%">
                <tr>
                    <td align="left" height="30" width="120">单品短信通知：</td>
                    <td>
                        <textarea name="itemcontent" cols="40" rows="3" onkeyup="gettextc(this, findObj('max_m').value, 'msg_c4');if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);" onkeydown="if(this.value.length>findObj('max_m').value)this.value=this.value.substring(0, findObj('max_m').value);"></textarea>
                        <br />每条短信最多<span id="Span3" style="color:Red">64</span>个字，超出部分不发送，剩余：<b id="B1" style="color:Red">64</b>
                        <br /><input type="button" value="短信预览" onclick="yulanMsg('itemcontent')" />
                    </td>
                </tr>
            <tr>
                <td align="left" height="30">指定商品：</td>
                <td>
                    <input type="button" value="选择商品" onclick="OpenDialogLable('dialogProduct.aspx',650,560);"/><br /><br />
                    <div id="productArea" style="width:470px; height:300px; overflow:scroll"></div>
                </td>
            </tr>
            <tr>
                <td align="left" height="30">订单状态：</td>
                <td>
                    <select id="orderstatus">
                        <option data-msg="交易状态" value="ALL" >全部状态</option>
                        <option data-msg="等待买家付款" value="NOT_PAID" >等待买家付款</option>
                        <option data-msg="买家已付款" value="PAID" >买家已付款</option>
                        <option data-msg="卖家已发货" value="SEND" >卖家已发货</option>
                        <option data-msg="交易成功" value="SUCCESS" >交易成功</option>
                        <option data-msg="交易关闭" value="DROP" >交易关闭</option>
                        <option data-msg="退款中的订单" value="REFUNDING" >退款中的订单</option>
                    </select>
                </td>
            </tr>

            </table>
            </div>


            
            <input id="max_m" value="64" type="hidden"/>
            <script>
                function findObj(n, d) {
                    var p, i, x;
                    if (!d) d = document;
                    if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
                        d = parent.frames[n.substring(p + 1)].document;
                        n = n.substring(0, p);
                    }
                    if (!(x = d[n]) && d.all) x = d.all[n];
                    for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
                    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
                    if (!x && d.getElementById) x = d.getElementById(n);
                    return x;
                }

                function gettextc(o, mc, show) {
                    var c_i = o.value.length;
                    var t_i = c_i <= mc ? (mc - c_i) : '0';
                    findObj(show).innerHTML = t_i;
                }
            </script>
            
            <table width="100%">
                <tr>
                    <td align="left" height="30" width="120">活动是否启用：</td>
                    <td>
                        <select name="isstop">
                            <option value="0">启动</option>
                            <option value="1">暂停</option>
                        </select>
                    </td>
                </tr>
            <tr>
                <td align="left" height="30" colspan="2">
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="修改营销计划" />
                </td>
            </tr>
        </table>

    </div>
    </div>
    </div>
    </form>

    <script language="javascript" type="text/javascript">
        function InitHiddenAreaText(index) {
            var obj = document.getElementById("area" + index);

            for (var i = 1; i < 5; i++) {
                document.getElementById("area" + i).style.display = "none";
            }

            obj.style.display = "";
        }

        InitHiddenAreaText('<%=index %>');
        gettextc(document.getElementById("content<%=index %>"), findObj('max_m').value, 'msg_c<%=index %>');
    </script>

</body>
</html>